<!doctype html>
<html>
    <head>
        <meta charset="utf-8">
        <title>{% block title %}{% endblock title %}</title>
        <meta name="description" content="{% block description %}{% endblock description %}">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta property="og:image" content="{{ url_for('static', filename='img/logo_big.png', _external=True) }}">
        <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/bootstrap.min.css') }}">
        <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/bootstrap-responsive.min.css') }}">
        <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/base.css') }}">
        <link rel="icon shortcut" href="{{ url_for('static', filename='img/favicon.ico') }}">
        <link rel="apple-touch-icon" href="{{ url_for('static', filename='img/logo_big.png') }}">
        <script src="{{ url_for('static', filename='js/jquery.min.js') }}"></script>
        <script src="{{ url_for('static', filename='js/run_page.js') }}"></script>
    </head>
    <body>
        <div class="endpoint-{{ request.endpoint }}" id="root-container">

        <div class="container" id="body-container">

{% block header %}

<div class="row">
    <div class="span10">
        <a href="{{ url_for('homepage') }}" class="mobile-logo visible-phone">
            <div class="logo-outside">
                <div class="logo-inside">dpxdt</div>
            </div>
        </a>
        <div class="homepage-logo hidden-phone">
            <div class="logo-outside">
                <div class="logo-inside">dpxdt</div>
            </div>
        </div>
        {% if build %}
            {% if url_for('view_build') != request.path %}
                <h1><a class="big-link" href="{{ url_for('view_build', id=build.id) }}">Build: {{ build.name }}</a></h1>
            {% else %}
                <h1>Build: {{ build.name }}</h1>
            {% endif %}
        {% else %}
            <h1>{% block page_title %}{% endblock page_title %}</h1>
        {% endif %}
    </div>
    <div class="span2 text-right hidden-phone base-logo-container">
        <a href="{{ url_for('homepage') }}">
            <div class="logo-outside">
                <div class="logo-inside">dpxdt</div>
            </div>
        </a>
    </div>
</div>

{% if release %}
    <div class="row">
        <div class="span7">
            {% if run %}
                <h4 class="ellipsis-overflow"><a class="big-link" id="release_link" href="{{ url_for('view_release', id=build.id, name=release.name, number=release.number) }}">Release: {{ release.name }} #{{ release.number }}</a></h4>
            {% else %}
                <h4>Release: {{ release.name }} #{{ release.number }}</h4>
            {% endif %}
        </div>
        <div class="span5 text-right">
            {% if release.status == 'good' %}
                <h4>Status: {{ release.status|title }}</h4>
            {% elif release.status == 'bad' %}
                <h4 class="text-error">Status: {{ release.status|title }}</h4>
            {% else %}
                <h4>Status: {{ release.status|title }}</h4>
            {% endif %}
        </div>
    </div>
{% endif %}


{% if release or run %}
    <div class="row">
        <div class="span7">
            <h4 class="ellipsis-overflow">{% block run_row_left %}{% endblock run_row_left %}</h4>
        </div>
        <div class="span5 text-right ">
            <div class="h4sized">
                {% block run_row_right %}{% endblock run_row_right %}
            </div>
        </div>
    </div>
{% endif %}

{% endblock header %}


{% block body %}
{% endblock body %}

        </div>  {# End body-container #}

{% block belowbody %}
{% endblock belowbody%}

{% block beforefooter %}
{% endblock beforefooter %}

{% block footer_container %}
<div class="container">
    <div class="row">
        <div class="span12">
            <div class="footer-section">
                <div class="row">
                    <div class="span6">
                        {% block footer_left %}{% endblock footer_left %}
                    </div>
                    <div class="span6 text-right">
                        {% block footer_right %}
                            {% if current_user.is_authenticated() %}
                                {{ current_user.email_address }}
                                &ndash;
                                <a href="{{ url_for('logout') }}">Sign out</a>
                            {% else %}
                                <a href="{{ url_for('login_view', next=url_for('homepage')) }}">Sign in</a>
                            {% endif %}
                        {% endblock footer_right %}
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock footer_container %}

    </div>  {# End root-container #}

{% include 'keyboard_shortcuts_dialog.html' %}

{# gae mini profiler #}
{% if profiler_includes %}
    {{ profiler_includes()|safe }}
{% endif %}

    </body>
</html>
